package presenter;

import base.BasePresenter;
import base.ResultCallBack;
import bean.GuangGaoBean;
import model.GuangGaoModel;
import view.GuangGaoView;
import view.YingDaoView;

/**
 * Created by Windows on 2019/11/5.
 */

public class GuangGaoPresenter extends BasePresenter<GuangGaoView> {
    private GuangGaoModel model;

    public GuangGaoPresenter() {
        this.model=new GuangGaoModel();
        addModel(model);
    }

    public void requestGuangGao() {
        model.requestGuangGao(new ResultCallBack<GuangGaoBean>() {
            @Override
            public void onSuccess(GuangGaoBean guangGaoBean) {
                if (mView!=null)
                    mView.onSuccess(guangGaoBean);

            }

            @Override
            public void onFail(String error) {
                if (mView!=null)
                mView.showToast(error);
                mView.onFail(error);

            }
        });

    }
}
